define(["require", "exports"], function (require, exports) {
    "use strict";
    var root = location.href.toString().replace(/CesiumMode.+$/i, "CesiumMode/");
    	//console.log(root);
    //root = root.replace(/\/main.html/, "");
    var AppX = {
        root: root,
        appConfig: {
            "theme": {
                "name": "FoldableTheme",
                "styles": [],
                "customStyles": []
            },
            "title": "都江堰集能燃气生产运营信息化系统",
            "subtitle": "A configurable web application",
            "version": "1.0.3",
            "debug": false,
            "comment": {
                "geometryService": ""
            },
            "mainContainer": "#mainContainer",
            "initextent": {},
           "loadOnStartWidgets": [
                {
                    "name": "Loading",
                    "discription": "加载动画",
                    "url": "widgets/Loading",
                    "main": "Widget",
                    "configPath": "",
                    "templatePath": "",
                    "optional": false
                },
                {
                    "name": "EndLoading",
                    "discription": "结束加载动画",
                    "url": "widgets/EndLoading",
                    "main": "Widget",
                    "configPath": "",
                    "templatePath": "",
                    "depend": "MenuBar",
                    "optional": false
                }, 
                {
                    "name": "BaseScene",
                    "discription": "基础场景",
                    "url": "widgets/BaseScene",
                    "main": "Widget",
                    "configPath": "",
                    "templatePath": "",
                    "optional": false
                },
                {
                    "name": "SideMenu",
                    "discription": "侧边菜单",
                    "url": "widgets/SideMenu",
                    "main": "Widget",
                    "configPath": "",
                    "templatePath": "",
                    "depend": "BaseWidget",
                    "optional": false
                }
             
            ],
            "menuBarWidgets": [
                 {
                    "id": "场景管理",
                    "label": "场景管理",
                    "icon": "/images/guanwangfenxi.png",
                    "data": [
                      {
                         "id": "changjingchakan",
                       "label": "查看",
                       "widget": "widgets/LayerList",
                       "main": "Widget",
                       "icon": "/images/choose.png",
                       "inPanel": true,
                        "panel": "Panel",
                        "order":"1",
                        "describe":"实现场景中所有对象信息查看和编辑"
                       },
                        {
                         "id": "changjingcaozuo",
                       "label": "场景操作",
                       "widget": "widgets/LayerList",
                       "main": "Widget",
                       "icon": "/images/choose.png",
                       "inPanel": true,
                        "panel": "Panel",
                        "order":"0",
                        "describe":"实现场景创建、导入、删除、启用、停止、保存、回退"
                       },
                       {
                            "id": "duixiangtianjiadaoru",
                            "label": "添加导入",
                            "widget": "widgets/AttributeAnnotation",
                            "main": "Widget",
                            "icon": "/images/choose.png",
                            "inPanel": true,
                            "panel": "Panel",
                            "describe":"添加几何、光线,导入模型、地形"
                       },
                       {
                          "id": "duixiangdaochu",
                          "label": "导出",
                          "widget": "widgets/AttributeXj",
                          "main": "Widget",
                          "icon": "/images/choose.png",
                          "inPanel": true,
                          "panel": "Panel",
                          "describe":"导出几何、模型、地形、场景"
                      },
                      {
                          "id": "caozuolishi",
                          "label": "操作历史",
                          "widget": "widgets/AttributeXj",
                          "main": "Widget",
                          "icon": "/images/choose.png",
                          "inPanel": true,
                          "panel": "Panel",
                          "describe":"查看操作历史，并能实现回退"
                      }
                      ]
                   }
            ],
            "gisResource": {
                "tianditu": {
                    "name": "天地图",
                    "groupname": "天地图",
                    "type": "tiled",
                    "config": [
                        {
                            "groupname": "天地图",
                            "name": "天地图",
                            "url": "http://118.24.21.156:6080/arcgis/rest/services/hezhang/BEIJING_DXT/MapServer"
                        }
                    ]
                },
                "Yingxiang": {
                    "name": "影像图",
                    "groupname": "影像图",
                    "type": "tiled",
                    "config": [
                        {
                            "groupname": "影像图",
                            "name": "影像图",
                            "url": "http://118.24.21.156:6080/arcgis/rest/services/hezhang/BEIJING_IMAGE/MapServer"
                        }
                    ]
                },
                "River": {
                    "name": "河流",
                    "groupname": "河流",
                    "type": "River",
                    "config": [
                        {
                            "groupname": "河流",
                            "name": "河流",
                            "url": "River"
                        }
                    ]
                },
                "RiverCounty": {
                    "name": "河流(县级)",
                    "groupname": "河流(县级)",
                    "type": "RiverCounty",
                    "config": [
                        {
                            "groupname": "河流(县级)",
                            "name": "河流(县级)",
                            "url": "RiverCounty"
                        }
                    ]
                }, 
                "RiverTown": {
                    "name": "河流(乡镇级)",
                    "groupname": "河流(乡镇级)",
                    "type": "RiverTown",
                    "config": [
                        {
                            "groupname": "河流(乡镇级)",
                            "name": "河流(乡镇级)",
                            "url": "RiverTown"
                        }
                    ]
                },
                "GSP": {
                    "name": "公示牌",
                    "groupname": "公示牌",
                    "type": "GSP",
                    "config": [
                        {
                            "groupname": "公示牌",
                            "name": "公示牌",
                            "url": "GSP"
                        }
                    ]
                },
                "PWK": {
                    "name": "排污口",
                    "groupname": "排污口",
                    "type": "PWK",
                    "config": [
                        {
                            "groupname": "排污口",
                            "name": "排污口",
                            "url": "PWK"
                        }
                    ]
                },
                "JCZD": {
                    "name": "检测站点",
                    "groupname": "检测站点",
                    "type": "JCZD",
                    "config": [
                        {
                            "groupname": "检测站点",
                            "name": "检测站点",
                            "url": "JCZD"
                        }
                    ]
                }, 
                "DISTRICTCounty": {
                    "name": "县级行政区划",
                    "groupname": "县级行政区划",
                    "type": "DISTRICTCounty",
                    "config": [
                        {
                            "groupname": "县级行政区划",
                            "name": "县级行政区划",
                            "url": "DISTRICTCounty"
                        }
                    ]
                },
               "DISTRICTTown": {
                    "name": "乡镇行政区划",
                    "groupname": "乡镇行政区划",
                    "type": "DISTRICTTown",
                    "config": [
                        {
                            "groupname": "乡镇行政区划",
                            "name": "乡镇行政区划",
                            "url": "DISTRICTTown"
                        }
                    ]
                },
            }
        },
        runtimeConfig: {
            map: null,
            Toast: null,
            Popup: null,
            PhotoWall: null,
            dataPanel: null,
            commonPanel: null,
            panels: null,
            fullpanels: null,
            loadMask: null,
            fieldConfig: null,
            unit: null,
        },
        dojoConfig: {
            packages: [
                {
                    name: "root",
                    location: root
                },
                {
                    name: "core",
                    location: root + "core"
                },
                {
                    name: "vendor",
                    location: root + "vendor"
                },
                {
                    name: "widgets",
                    location: root + "widgets"
                },
                {
                	name:"CsLibrary",
                	location: root + "CsLibrary"
                }
            ]
        }
    };
    window["AppX"] = AppX;
    return AppX;
});
